package exam.t6;

public class Interview extends Thread{
    Student student[];
    int num=0;
    public Interview(Student s[]){
        this.student=s;
    }
    @Override
    public void run() {
        System.out.println("start");
        while (true){
            try {
                System.out.println(student[num].getId()+" "+student[num].getName());
                Thread.sleep(5000);
                System.out.println("next");
                num++;
                if(num>=student.length){
                    break;
                }
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
